<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>HUI</title>
<link rel="stylesheet" type="text/css" href="../css/hui.css" />
</head>
<body>
<header class="hui-header">
    <div id="hui-back"></div>
    <h1>HUI Scroll 事件 </h1>
</header>
<div class="hui-wrap">
	<div class="hui-common-title" style="margin-top:15px;">
		<div class="hui-common-title-line"></div>
		<div class="hui-common-title-txt">scroll 事件演示</div>
		<div class="hui-common-title-line"></div>
	</div>
	<div class="hui-text" style="padding:22px; text-align:center;">
		请滚动窗口体验 ^_^
	</div>
	<div style="height:300px; width:90%; margin:0 auto; overflow-y:auto;" id="demo1">
	    <div style="height:1500px; background:#3388FF; line-height:300px; color:#FFFFFF; text-align:center;">
			此 div 可以滚动
	    </div>
	</div>
	<div style="height:1000px;"></div>
</div>
<script src="../js/hui.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
hui.onScroll(function(scTop){
   console.log('窗口滚动高度 :' + scTop);
});
hui('#demo1').scroll(function(){
   console.log('div 滚动高度 :' + this.scrollTop);
});
</script>
</body>
</html>